package com.woniu.supermarket.service.impl;

import com.woniu.supermarket.entity.Type;
import com.woniu.supermarket.mapper.TypeMapper;
import com.woniu.supermarket.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TypeServiceImpl implements ITypeService{
    @Autowired
    TypeMapper typeMapper;

    @Override
    public int add(Type promotionType) {
        return typeMapper.insert(promotionType);
    }

    @Override
    public void modify(Type promotionType) {
        typeMapper.updateByPrimaryKey(promotionType);
    }
}
